package service

import (
	"gitee.com/video_web/cmd/user/dal/db"
	"gitee.com/video_web/cmd/user/pack"
	"gitee.com/video_web/kitex_gen/user"
)

// MGetUser multiple get list of user info
func (s *ReadUserService) MGetUser(req *user.MGetUserRequest) ([]*user.User, error) {
	modelUsers, err := db.MGetUsers(s.ctx, req.UserIds)
	if err != nil {
		return nil, err
	}
	return pack.Users(modelUsers), nil
}
